package com.atguigu.create.prototype.simple;

import java.math.BigDecimal;

//@Data
//@NoArgsConstructor
//@AllArgsConstructor
//@ToString
public class Sheep implements Cloneable {
    @Override
    protected Sheep clone() throws CloneNotSupportedException {
        System.out.println("clone sheep");
        return (Sheep) super.clone();
    }

    private String name;
    private Integer age;
    private BigDecimal weight;

    private SheepMaster sheepMaster;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public BigDecimal getWeight() {
        return weight;
    }

    public void setWeight(BigDecimal weight) {
        this.weight = weight;
    }

    public SheepMaster getSheepMaster() {
        return sheepMaster;
    }

    public void setSheepMaster(SheepMaster sheepMaster) {
        this.sheepMaster = sheepMaster;
    }

    public Sheep() {
    }

    public Sheep(String name, Integer age, BigDecimal weight, SheepMaster sheepMaster) {
        this.name = name;
        this.age = age;
        this.weight = weight;
        this.sheepMaster = sheepMaster;
    }

    @Override
    public String toString() {
        return "Sheep{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", weight=" + weight +
                ", sheepMaster=" + sheepMaster +
                '}';
    }
}
